package cn.com.chengmandian.service.erp;

import cn.com.chengmandian.core.web.pojo.AjaxResult;
import cn.com.chengmandian.service.erp.form.PartSendCreateForm;
import cn.com.chengmandian.service.erp.form.StockApplyAuditForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "cmd-erp-part")
public interface ErpPartClient {

    /**
     * 备品备件-生成发货单
     * @param form
     * @return 发货单编号
     */
    @PostMapping("/erppart/inner/send/create")
    AjaxResult<String> create(@RequestBody PartSendCreateForm form);

    /**
     * 备品备件-发货单明细
     */
    @GetMapping("/erppart/inner/detail/{stockSendId}")
    AjaxResult detail(@PathVariable Integer stockSendId);

    @PostMapping("/erppart/inner/allot/apply/audit")
    AjaxResult allotApplyAudit(@RequestBody StockApplyAuditForm form);
}
